<template>
  <tr>
          <td>合计:{{totalPrice}}</td>
          <td colspan="5"></td>
        </tr>
</template>

<script>
export default {
    props:{
        goodList:''
    },
    computed: {
        totalPrice() {
            let sum = 0
           this.goodList.forEach(item=> {
            sum+=item.price*item.num
           } )
        return sum 
        }
    }
}
</script>

<style>

</style>